#include<iostream>
#include<cstring>
using namespace std;
char s[100], t[100];
int main()
{
	cin >> s >> t;
	int len = strlen(s);
	int flag = 0;
	for(int i = 0; i < len; i++)
		if(s[i] != t[i]) flag = 1;
	if(flag == 1) cout << "No" << endl;
	else cout << "Yes" << endl;
	return 0;
}
